<description>By the very nature of the underlying algorithm RemoveDirt cannot clean at sharp scene switches. Only very few random blocks are cleaned. ImproveSceneSwitch is a simple filter to improve this situation.</description>
<description>If extrapolate = true (false is the default), then instead of simple frame doubling extrapolation is used to calculate the scene switch frames.</description>
<description>If first = false, then the frame remains unchanged, even if it is detected as the first frame of a new scene. Similarily, if last = false, then the frame remains unchanged even if it is detected as the last frame of a scene.</description>
<description>If first = false, then the frame remains unchanged, even if it is detected as the first frame of a new scene. Similarily, if last = false, then the frame remains unchanged even if it is detected as the last frame of a scene.</description>
<description>If field = 0 then the entire frame is used for calculating difference between two subsequent frames. If field = 1, then only the top field is used for calculating the difference. If field = 2, then only the bottom field is used for calculating the difference.</description>
<description>A block B is considered a neighbor of a block A by RemoveDirt, if both horizontally and verticaly both blocks are only dist blocks apart. Now for a given block RemoveDirt counts all the neighbor blocks which are marked as motion blocks.</description>
<description>RemoveDirt can use also adaptive thresholds which vary from block to block. We do not describe the somewhat complicated algorithm here. The adaptive thresholds are controlled by the athreshold variable. It may very well attain negative values, but if athreshold < -mthreshold/2, then there will be no cleaning at all.</description>
<description>If the total luma difference of the two adjacent border line increases by more than pthreshold, then cleaning of the block is undone by RemoveDirt.</description>
<description>mode = 0 is a very simple averaging mode. If a block is marked as cleanable, then the pixels of this block are replaced by the average of the corresponding pixels in the previous and the subsequent frame. Finally there is the experimental mode = 1, which is somewhere in the middle between mode 0 and 2 but closer to mode 2.</description>
<description>If show = 1, then all blocks, which are cleaned are colored red. If show = 2, then all blocks, which are not cleaned, are colored red. The default value show = 0, of course, implies that no coloring is done.</description>